#ifndef MY_RENDER_DOT
#define MY_RENDER_DOT
#include<iostream>
#include"./vector4.hpp"
using std::cout;
using std::endl;

class Dot{
    public:
    float x;
    float y;
    float z;
    float w;

    // 这是平面的点
    Dot(float x,float y):x(x),y(y),z(0),w(1.0f){}
    Dot(float x,float y,float z):x(x),y(y),z(z),w(1.0f){}
    Dot():x(0),y(0),z(0),w(1.0f){}
    Dot(float x,float y,float z,float w):x(x),y(y),z(z),w(w){};
    // 点与点的相加，得到的结果是两个点的中点
    Dot operator+(const Dot& other) const {
        return Dot((x + other.x)/2, (y + other.y)/2, (z + other.z)/2,1);
    }
    // 点与点相减，得到的是一个向量
    Vector4 operator-(const Dot& other) const {
        return Vector4(x - other.x, y - other.y, z - other.z);
    }
    void printDot(){
        cout<<x<<","<<y<<","<<z<<","<<w<<endl;
    }
};




#endif